Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream.go: update Retry backoff to follow gRFC A6 #7870

Closed
wants to merge 1 commit into from

Conversation

aranjans
Copy link
Contributor

fixes #7514.

Summary

This PR updates the retry backoff logic in the gRPC client to align with the latest proposal for client-side retry support. The following changes have been made:

  • Adjusted the backoff duration calculation to apply jitter correctly, using a random factor between 0.8 and 1.2, ensuring that the backoff delay may be slightly lower than InitialBackoff or slightly higher than MaxBackoff.
  • Removed the cap on the final backoff duration to allow for the jitter effect, promoting a more distributed retry behavior across clients.
  • Updated the README documentation to reflect the new backoff logic and provide clearer guidance on configuring the retry policy.

RELEASE NOTES:

  • stream.go: fix Retry Backoff Logic in gRPC Client to follow changes made to gRFC A6.

@aranjans aranjans added this to the 1.69 Release milestone Nov 24, 2024
@aranjans aranjans added Type: Behavior Change Behavior changes not categorized as bugs Area: Client Includes Channel/Subchannel/Streams, Connectivity States, RPC Retries, Dial/Call Options and more. labels Nov 24, 2024
Copy link

codecov bot commented Nov 24, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 82.10%. Comparing base (13d5a16) to head (82cecd4).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
stream.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7870      +/-   ##
==========================================
+ Coverage   82.04%   82.10%   +0.06%     
==========================================
  Files         375      375              
  Lines       37984    37985       +1     
==========================================
+ Hits        31165    31189      +24     
+ Misses       5532     5509      -23     
  Partials     1287     1287              
Files with missing lines Coverage Δ
stream.go 81.45% <66.66%> (+0.01%) ⬆️

... and 19 files with indirect coverage changes

---- 🚨 Try these New Features:

@aranjans aranjans requested a review from purnesh42H November 24, 2024 13:27
@aranjans aranjans changed the title stream.go: update Retry backoff to follow changes made to gRFC A6 stream.go: update Retry backoff to follow gRFC A6 Nov 24, 2024
@aranjans
Copy link
Contributor Author

Closing this PR as someone else has also raised a PR for the mentioned issue, and is being reviewed here.

@aranjans aranjans closed this Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Client Includes Channel/Subchannel/Streams, Connectivity States, RPC Retries, Dial/Call Options and more. Type: Behavior Change Behavior changes not categorized as bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Retry backoff to follow changes made to gRFC A6
2 participants